home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 25
/
AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso
/
PublicDomain
/
Anwendungen
/
scrollscreen
/
scrollscreen.c
< prev
Wrap
C/C++ Source or Header
|
1998-12-20
|
1KB
|
59 lines
/*
ScrollScreen. V0.9
Scrolls the current public screen after spesified paramaters
given via the argument. To use this program as a commodity,
use the F-key commodity from commodore.
Made by Kjetil S. Matheussen 1998.
Arguments are: [x] [y]. Both arguments must be spesified (important).
'x' means how many x-lines to scroll right. 'y' means how many
y-lines to scroll down.
*/
#include <exec/types.h>
#include <intuition/intuition.h>
#include <intuition/classes.h>
#include <intuition/classusr.h>
#include <intuition/imageclass.h>
#include <intuition/gadgetclass.h>
#include <libraries/gadtools.h>
#include <graphics/displayinfo.h>
#include <graphics/gfxbase.h>
#include <clib/exec_protos.h>
#include <clib/intuition_protos.h>
#include <clib/gadtools_protos.h>
#include <clib/graphics_protos.h>
#include <clib/utility_protos.h>
#include <string.h>
#include <stdio.h>
struct Screen *Scr = NULL;
UBYTE *PubScreenName = NULL;
int main(int argc,char **argv){
int x,y;
if ( ! ( Scr = LockPubScreen( PubScreenName )))
return( 1L );
sscanf(argv[1],"%d",&x);
sscanf(argv[2],"%d",&y);
if(y+Scr->TopEdge<0 || (Scr->TopEdge>=0 && y<0)) y=0;
MoveScreen(Scr,-x,-y);
UnlockPubScreen( NULL, Scr );
return(0);
}